import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;

public class D9292 {
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("d:\\400个随机数.txt");
        Random r = new Random();
        int he = 0;
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 40; j++) {
                int sjs = r.nextInt(10);
                fw.write(sjs+" ");
                if (sjs%2==0){
                    he+=i;
                }

            }
            fw.write("\n");

        }
        fw.write("偶数和"+he);
     fw.close();
    }
}
